using System;
using System.Collections.Generic;
using System.Text;

namespace Colman.Rpg
{
    /// <summary>
    /// Represents a weapon a player can yield.
    /// </summary>
    [Serializable]
    public class Weapon : Item
    {
        /// <summary>
        /// Creates a new instance of <see cref="Weapon" />.
        /// </summary>
        /// <param name="attackPoints">Represents the attack points the weapon has.</param>
        /// <param name="name">Represents the weapon's name or type.</param>
        /// <param name="cost">The cost per piece of this weapon.</param>
        [System.Diagnostics.DebuggerStepThrough]
        public Weapon(int attackPoints, string name, int cost)
            : this(attackPoints, name, 1, cost)
        {
        }

        /// <summary>
        /// Creates a new instance of <see cref="Weapon" />.
        /// </summary>
        /// <param name="attackPoints">Represents the attack points the weapon has.</param>
        /// <param name="name">Represents the weapon's name or type.</param>
        /// <param name="amount">The amount of that same weapon.</param>
        /// <param name="cost">The cost per piece of this weapon.</param>
        [System.Diagnostics.DebuggerStepThrough]
        public Weapon(int attackPoints, string name, int amount, int cost)
            : base(0, attackPoints, name, amount, cost)
        {
        }

        /// <summary>
        /// Gets the same weapon as the current object is, only with the <see cref="Item.Amount"/> property set to 1.
        /// </summary>
        /// <returns>The same weapon as the current object is, only with the <see cref="Item.Amount"/> property set to 1.</returns>
        public override Item GetOne()
        {
            return new Weapon(this.AttackPoints, this.Name, this.Cost);
        }
    }
}
